﻿namespace Bootsy.Tests

import Bootsy.Core

class DummyChatUser(IChatUser):
	[getter(FullName)]
	_fullName as string
	
	def constructor(fullName as string):
		_fullName = fullName

class DummyChatMessage(IChatMessage):
	[getter(Body)]
	_body as string
	
	[getter(Chat)]
	_chat as IChat
	
	[property(Sender)]
	_sender as IChatUser
	
	def constructor(chat as IChat, body as string):
		_chat = chat
		_body = body
	
class DummyChat(IChat):

	[getter(Messages)]
	_messages = System.Collections.Specialized.StringCollection()
	
	def PostMessage(message as string):
		_messages.Add(message)
		
	def NewMessage(body as string):
		return DummyChatMessage(self, body)
		
	def NewMessageFromUser(body as string, userName as string):
		return DummyChatMessage(self, body, Sender: DummyChatUser(userName))
